package top.healthylife.gateway.platform.zd.api.api.querybysubject;


import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.healthylife.gateway.core.service.ParentFace;
import top.healthylife.gateway.dto.annotation.ApiServiceExplain;
import top.healthylife.gateway.platform.zd.api.utils.ZdHttpUtil;
import top.healthylife.gateway.platform.zd.dto.querybysubject.req.ZdReqQueryBySubjectDto;
import top.healthylife.gateway.platform.zd.dto.querybysubject.res.ZdResQueryBySubjectDto;

/**
 * @author : GaoZeXi
 * @date 2022/1/11 16:32
 */
@Slf4j
@Service
@ApiServiceExplain(price = 20, apiName = "按主体查询接口", info = "第三方通过该接口进行按主体查询，若查询成功，则返回相关登记证明编号及摘要信息。")
public class ZdQueryBySubjectApi implements ParentFace<ZdReqQueryBySubjectDto, ZdResQueryBySubjectDto> {
    static final String SERVICE_NAME = "queryBySubject";

    @Override
    public ZdResQueryBySubjectDto execute(ZdReqQueryBySubjectDto t) {
        return ZdHttpUtil.httpRequest(t, SERVICE_NAME, ZdResQueryBySubjectDto.class);
    }
}
